<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>列表</title>
    <head th:include="includes :: header"></head>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>列表</h5>
        </div>
        <div class="ibox-content">
            <div class="panel panel-default">
                <div class="panel-heading">
                    查询列表
                </div>
                <div class="panel-body form-group" style="margin-bottom:0px;">
                    <!--<label class="col-sm-1 control-label" style=" margin-top:5px">创建时间</label>-->
                    <!--<div class="col-sm-2" >-->
                        <!--<input type="text" class="form-control" placeholder="请选择时间范围"   name="createTime" id="test_2"/>-->
                    <!--</div>-->
                    <label class="col-sm-1 control-label" style=" margin-top:5px">读者姓名</label>
                    <div class="col-sm-2"  >
                        <input type="text" class="form-control" placeholder="请输入读者姓名"  name="name" id="name__"/>
                    </div>
                    <label class="col-sm-1 control-label"  style=" margin-top:5px;">读者证号</label>
                    <div class="col-sm-2" >
                        <input type="number" class="form-control" placeholder="请输入读者证号" style="" name="cardNum" id="cardNum__"/>
                    </div>
                    <label class="col-sm-1 control-label" style=" margin-top:5px">身份证号</label>
                    <div class="col-sm-2">
                        <input type="number" class="form-control" placeholder="请输入身份证号" style="" id="idCard__" name="idCard"/>
                    </div>
                </div>

                <div class="panel-body form-group" style="margin-bottom:0px;">
                    <label class="col-sm-1 control-label" style=" margin-top:5px">手机号</label>
                    <div class="col-sm-2">
                        <input type="number" class="form-control" placeholder="请输入手机号" style="" id="phone__" name="phone"/>
                    </div>
                    <div class="col-sm-3" style="text-align: center;margin: auto" >
                        <button class="btn btn-primary"  id="search_btn" style="width: 200px" >查询</button>
                    </div>
                </div>
                    <table id="mytab" name="mytab"  class="table table-hover"></table>
                <div id="toolbar" class="btn-group pull-right" style="margin-right: 20px;">

                    <button id="btn_delete" shiro:hasPermission="readUser:batchRemove" onclick="batchRemove()"
                            type="button" class="btn btn-default" style="display: block;">
                        <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>批量删除
                    </button>
                    <button id="btn_add" type="button" shiro:hasPermission="readUser:add" class="btn btn-default"
                            data-toggle="modal" data-target="#webAdd">
                        <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>新增
                    </button>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="modal fade bs-example-modal-lg" id="webAdd" tabindex="-1" role="dialog" aria-labelledby="webAddLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="webAddTitle">
                    新增
                </h4>
            </div>
            <form class="form-horizontal" id="formadd">
                <div class="modal-body">
                    <div class="form-group">
                        <label class="col-sm-2 control-label"><span style="color: red">*</span>读者姓名：</label>
                        <div class="col-sm-4">
                            <input id="name" name="name" type="text" placeholder="请输入读者姓名" class="form-control" required=""
                                   aria-required="true">
                        </div>
                        <label class="col-sm-2 control-label"><span style="color: red">*</span>读者证号：</label>
                        <div class="col-sm-4">
                            <input id="cardNum" name="cardNum" type="text" placeholder="请输入读者证号" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label"><span style="color: red">*</span>读者手机号：</label>
                        <div class="col-sm-4">
                            <input id="phone" name="phone" type="text" placeholder="请输入读者手机号"  maxlength="11" minlength="11" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">读者证号密码：</label>
                        <div class="col-sm-4">
                            <input name="cardPwd" id="cardPwd" type="text" class="form-control" placeholder="请输入读者微信号"/>
                        </div>
                        <label class="col-sm-2 control-label">读者性别：</label>
                        <div class="col-sm-4">
                            <select id="sex" name="sex"  class="form-control">
                                <option value="0">男士</option>
                                <option value="1">女士</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">读者地址：</label>
                        <div class="col-sm-4">
                            <input name="adress" id="adress" type="text" class="form-control" placeholder="请输入读者微信号"/>
                        </div>
                        <label class="col-sm-2 control-label">读者年龄：</label>
                        <div class="col-sm-4">
                            <input name="age" id="age" type="text" class="form-control" placeholder="请输入读者微信号"/>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">读者发证日期：</label>
                        <div class="col-sm-4">
                            <input id="cardRcDate" name="cardRcDate" placeholder="请选择读者发证日期" type="text" class="form-control" />
                        </div>
                        <label class="col-sm-2 control-label">读者身份证号：</label>
                        <div class="col-sm-4">
                            <input id="idCard" name="idCard" type="text" placeholder="请输入读者身份证号" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">读者QQ号：</label>
                        <div class="col-sm-4">
                            <input id="qq" name="qq" type="text" class="form-control" placeholder="请输入读者QQ号" />
                        </div>
                        <label class="col-sm-2 control-label">读者微信号：</label>
                        <div class="col-sm-4">
                            <input id="wx" name="wx" type="text" class="form-control" placeholder="请输入读者微信号"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">读者邮箱：</label>
                        <div class="col-sm-4">
                            <input id="email" name="email" type="text" class="form-control" placeholder="请输入读者QQ号" />
                        </div>
                        <label class="col-sm-2 control-label">读者工作单位：</label>
                        <div class="col-sm-4">
                            <input name="workAdress" id="workAdress" type="text" class="form-control" placeholder="请输入读者工作单位"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">读者个性签名：</label>
                        <div class="col-sm-10">
                            <textarea id="remark" name="remark" rows="3" placeholder="请输入读者个性签名" class="form-control"></textarea>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                    </button>
                    <button type="reset" class="btn btn-error">重置
                    </button>
                    <button type="submit" id="add" class="btn btn-primary">
                        确认新增
                    </button>
                </div>
            </form>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
<input type="hidden" value="" id="deleteId"/>
<div class="modal fade" id="updateStatus" tabindex="-1" role="dialog" aria-labelledby="webAddLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title">
                    批量修改状态
                </h4>
            </div>
            <form class="form-horizontal" method="post" id="update_status">
                <div class="modal-body">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">状态：</label>
                        <div class="col-sm-8">
                            <select class="form-control" id="status" required name="status">
                                <option value="0">启用</option>
                                <option value="1">停用</option>
                            </select>
                        </div>
                        <input id="statusId" type="hidden" name="manyId"/>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                    </button>
                    <button type="button" id="updateSta" class="btn btn-primary" data-dismiss="modal">
                        确认修改
                    </button>
                </div>
            </form>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
<div class="modal fade bs-example-modal-lg" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    修改
                </h4>
            </div>
            <form class="form-horizontal" id="updateform">
                <input type="hidden" name="id" />
                <div class="modal-body">
                    <div class="form-group">
                        <label class="col-sm-2 control-label"><span style="color: red">*</span>读者姓名：</label>
                        <div class="col-sm-4">
                            <input id="name_" name="name" type="text" placeholder="请输入读者姓名" class="form-control" required=""
                                   aria-required="true">
                        </div>
                        <label class="col-sm-2 control-label"><span style="color: red">*</span>读者证号：</label>
                        <div class="col-sm-4">
                            <input id="cardNum_" name="cardNum" type="text" placeholder="请输入读者证号" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label"><span style="color: red">*</span>读者手机号：</label>
                        <div class="col-sm-4">
                            <input id="phone_" name="phone" type="text" placeholder="请输入读者手机号"  maxlength="11" minlength="11" class="form-control"/>
                        </div>

                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">读者证号密码：</label>
                        <div class="col-sm-4">
                            <input name="cardPwd" id="cardPwd_" type="text" class="form-control" placeholder="请输入读者微信号"/>
                        </div>
                        <label class="col-sm-2 control-label">读者性别：</label>
                        <div class="col-sm-4">
                            <select id="sex_" name="sex"  class="form-control">
                                <option value="0">男士</option>
                                <option value="1">女士</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">读者地址：</label>
                        <div class="col-sm-4">
                            <input name="adress" id="adress_" type="text" class="form-control" placeholder="请输入读者微信号"/>
                        </div>
                        <label class="col-sm-2 control-label">读者年龄：</label>
                        <div class="col-sm-4">
                            <input name="age" id="age_" type="text" class="form-control" placeholder="请输入读者微信号"/>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">读者发证日期：</label>
                        <div class="col-sm-4">
                            <input id="cardRcDate_" name="cardRcDate" placeholder="请选择读者发证日期" type="text" class="form-control" />
                        </div>
                        <label class="col-sm-2 control-label">读者身份证号：</label>
                        <div class="col-sm-4">
                            <input id="idCard_" name="idCard" type="text" placeholder="请输入读者身份证号" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">读者QQ号：</label>
                        <div class="col-sm-4">
                            <input id="qq_" name="qq" type="text" class="form-control" placeholder="请输入读者QQ号" />
                        </div>
                        <label class="col-sm-2 control-label">读者微信号：</label>
                        <div class="col-sm-4">
                            <input id="wx_" name="wx" type="text" class="form-control" placeholder="请输入读者微信号"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">读者邮箱：</label>
                        <div class="col-sm-4">
                            <input id="email_" name="email" type="text" class="form-control" placeholder="请输入读者QQ号" />
                        </div>
                        <label class="col-sm-2 control-label">读者工作单位：</label>
                        <div class="col-sm-4">
                            <input name="workAdress" id="workAdress_" type="text" class="form-control" placeholder="请输入读者工作单位"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">读者个性签名：</label>
                        <div class="col-sm-10">
                            <textarea id="remark_" name="remark" rows="3" placeholder="请输入读者个性签名" class="form-control"></textarea>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                    </button>
                    <button type="button" id="update" class="btn btn-primary">
                        确认修改
                    </button>
                </div>
            </form>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
<div class="modal fade  bs-example-modal-lg" id="order_item_list" tabindex="-1" role="dialog" aria-labelledby="remark_modal" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title">
                    地址管理
                </h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" id="form_add">
                    <input type="hidden" id="id_add" name="id" />
                    <input type="hidden" id="readUserId_add" name="readUserId" />
                    <div class="modal-body">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">联系人</label>
                            <div class="col-sm-4">
                                <input id="name_add" name="name" type="text" placeholder="请输入联系人" class="form-control" required=""
                                       aria-required="true">
                            </div>
                            <label class="col-sm-2 control-label">联系方式</label>
                            <div class="col-sm-4">
                                <input id="phone_add" name="phone" type="text" placeholder="请输入联系方式" class="form-control" required=""
                                       aria-required="true">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">地址</label>
                            <div class="col-sm-4">
                                <input id="adress_add" name="adress" type="text" placeholder="请输入地址" class="form-control" required=""
                                       aria-required="true">
                            </div>
                            <label class="col-sm-2 control-label">是否默认</label>
                            <div class="col-sm-4">
                                <select class="form-control" name="isOften">
                                    <option value="0">是</option>
                                    <option value="1">否</option>
                                </select>
                            </div>
                        </div>
                    </div>
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                        </button>
                    <button type="reset" class="btn btn-default" id="reset_add" onclick="resetAddress()">重置
                    </button>
                        <button type="button" id="add_add" class="btn btn-primary">
                            确认新增
                        </button>
                </form>
                <table id="mytab2" name="mytab2" class="table table-hover"></table>
                <div id="toolbar1" class="btn-group pull-right" style="margin-right: 20px;">
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal -->
    </div>
</div>
<div class="modal fade  bs-example-modal-lg" id="love_item_list" tabindex="-1" role="dialog" aria-labelledby="remark_modal" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title">
                    兴趣爱好管理
                </h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" id="form_add_love">
                    <input type="hidden" id="id_add_love" name="id" />
                    <input type="hidden" id="readUserId_add_love" name="readUserId" />
                    <div class="modal-body">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">爱好名称</label>
                            <div class="col-sm-4">
                                <input id="title_add" name="title" type="text" placeholder="请输入爱好名称" class="form-control" required=""
                                       aria-required="true">
                            </div>
                        </div>
                    </div>
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                    </button>
                    <button type="reset" class="btn btn-default" id="reset_add_love" onclick="resetLove()">重置
                    </button>
                    <button type="button" id="add_add_love" class="btn btn-primary">
                        确认新增
                    </button>
                </form>
                <table id="mytab3" name="mytab2" class="table table-hover"></table>
                <div id="toolbar2" class="btn-group pull-right" style="margin-right: 20px;">
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal -->
    </div>
</div>

<!--shiro控制bootstraptable行内按钮看见性 来自cflworks的创新方案 -->
<div>
    <script type="text/javascript">
        var s_edit_h = 'hidden';
        var s_remove_h = 'hidden';
        var s_resetPwd_h = 'hidden';
    </script>
</div>
<div shiro:hasPermission="cflwork:readUser:edit">
    <script type="text/javascript">
        s_edit_h = '';
    </script>
</div>
<div shiro:hasPermission="cflwork:readUser:remove">
    <script type="text/javascript">
        var s_remove_h = '';
    </script>
</div>
<div shiro:hasPermission="cflwork:readUser:resetPwd">
    <script type="text/javascript">
        var s_resetPwd_h = '';
    </script>
</div>

<div th:include="includes :: footer"></div>
<script src="/js/appjs/readUser/readUser.js"></script>
<script src="/js/md5.js" type="text/javascript"></script>
<script>
    laydate.render({
        elem: '#test_2'//指定元素，
        ,type: 'date'
        ,range: true
    });
    laydate.render({
        elem: '#cardRcDate'//指定元素，
        ,type: 'date'
    });
</script>
</body>
</html>
